﻿using System;
using System.Collections;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
//using GemBox.Document;
//using GemBox.Document.Tables;
namespace xiushen.Tests
{
//    [TestClass]
//    public class WordReading
//    {
//        [TestMethod]
//        public void ReadWord(){
//            // If using Professional version, put your serial key below.
//            ComponentInfo.SetLicense("FREE-LIMITED-KEY");
//            // If sample exceeds Free version limitations then continue as trial version:  
//            // http://www.gemboxsoftware.com/Document/help/html/Evaluation_and_Licensing.htm
//            ComponentInfo.FreeLimitReached += (sender, e) => e.FreeLimitReachedAction = FreeLimitReachedAction.ContinueAsTrial;

//            string fileName = @"d:\004.docx";
//            DocumentModel document = DocumentModel.Load(fileName, LoadOptions.DocxDefault);

//            StringBuilder sb = new StringBuilder();

//            foreach (Paragraph paragraph in document.GetChildElements(true, ElementType.Paragraph))
//            {
//                foreach (Run run in paragraph.GetChildElements(true, ElementType.Run))
//                {
//                    bool isBold = run.CharacterFormat.Bold;
//                    string text = run.Text;

//                    sb.AppendFormat("{0}{1}{2}", isBold ? "<b>" : "", text, isBold ? "</b>" : "");
//                }
//                sb.AppendLine();
//            }


//            Console.WriteLine(sb.ToString());
//    }

//}
}